package com.wu.service.sys;

import com.baomidou.mybatisplus.extension.service.IService;
import com.wu.base.ApiResponse;
import com.wu.entity.sys.SResourceDo;
import com.wu.pojo.reqeust.sys.AddOrUpdateResourceRequest;
import com.wu.pojo.reqeust.sys.DeleteResourceRequest;
import com.wu.pojo.reqeust.sys.ListResourceRequest;
import com.wu.pojo.reqeust.sys.ResourceAllRequest;

import java.util.Set;


/**
 * 权限资源表(SResource)表服务接口
 *
 * @since 2020-12-29 13:20:28
 */
public interface SResourceService extends IService<SResourceDo> {

    /**
     * 资源 列表
     * */
    ApiResponse listResource(ListResourceRequest request);

    ApiResponse treeList(ResourceAllRequest request);

    ApiResponse treeListAll(ResourceAllRequest request);

    void sync(ResourceAllRequest request);
    /**
     * 新增/修改 资源
     * */
    ApiResponse addOrUpdateResource(AddOrUpdateResourceRequest request, Long userId);

    /**
     * 删除 资源
     * */
    ApiResponse deleteResource(DeleteResourceRequest request, Long userId);

    /**
     * 根据用户id获取资源
     * */
    Set<String> getResourceByUserId(Long userId);
}